﻿<%@ Page Language="C#" AutoEventWireup="true" CodeBehind="AdmStuManage.aspx.cs" Inherits="LMS.SMSH.WEB.AdmStuManage" %>

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head id="Head1" runat="server">
    <title>无标题页</title>
    <script src="jQuery/jquery-1.7.1.js" type="text/javascript"></script>
    <script type="text/javascript">
        $(function () {
            //            $("#btnFind").click(function () {
            //                if ($("#txtStudentName").val().length == 0) {
            //                    alert("姓名不能为空！");
            //                    $("#txtStudentName").focus();
            //                    return false;
            //                }
            //                return true;
            //            })
        })
    </script>
</head>
<body>
    <form id="form1" runat="server">
    <asp:ScriptManager ID="ScriptManager1" runat="server">
    </asp:ScriptManager>
    <div align="center">
        <table width="700" border="0" cellspacing="0" cellpadding="0">
            <tr>
                <td height="30" align="left" style="width: 120px">
                    &nbsp;&nbsp;<strong>学生管理</strong>
                </td>
                <td height="30" align="right" style="width: 580px; text-align: center">
                    <font size="2">学生姓名<asp:TextBox ID="txtStudentName" runat="server" Columns="6" MaxLength="50"
                        Width="150px"></asp:TextBox></font>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
                    <asp:Button ID="btnFind" runat="server" OnClick="btnFind_Click" Text="搜 索" />
                    &nbsp;&nbsp;&nbsp;&nbsp;
                  <asp:Button ID="btnNew" runat="server" OnClick="btnNew_Click" Text="新 增" />&nbsp;
                </td>
            </tr>
            <tr>
                <td height="30" colspan="2" align="left">
                    <asp:UpdatePanel ID="UpdatePanel1" runat="server">
                        <ContentTemplate>
                            <asp:GridView ID="gvStudentList" runat="server" AutoGenerateColumns="False" BorderColor="Black"
                                Width="700px" AllowPaging="True" OnRowDataBound="gvStudentList_RowDataBound"
                                OnRowCommand="gvStudentList_RowCommand" 
                                onpageindexchanging="gvStudentList_PageIndexChanging" PageSize="5">
                                <RowStyle BackColor="Orange" Font-Size="Small" />
                                <Columns>
                                    <asp:TemplateField HeaderText="行编号">
                                        <ItemTemplate>
                                        </ItemTemplate>
                                        <HeaderStyle HorizontalAlign="Center" Width="10%" />
                                        <ItemStyle HorizontalAlign="Center" Width="10%" />
                                    </asp:TemplateField>
                                    <asp:TemplateField HeaderText="全选">
                                        <HeaderStyle HorizontalAlign="Center" Width="10%" />
                                        <HeaderTemplate>
                                            <asp:CheckBox ID="chkHeader" runat="server" Text="全选" AutoPostBack="true" OnCheckedChanged="chkHeader_CheckedChanged" />
                                        </HeaderTemplate>
                                        <ItemStyle HorizontalAlign="Center" Width="10%" />
                                        <ItemTemplate>
                                            <asp:CheckBox ID="chkItem" runat="server" Text="" AutoPostBack="true" />
                                        </ItemTemplate>
                                    </asp:TemplateField>
                                    <asp:BoundField DataField="stuNo" HeaderText="学号" ReadOnly="True">
                                        <ControlStyle Width="100px" />
                                        <HeaderStyle HorizontalAlign="Center" Width="20%" />
                                        <ItemStyle HorizontalAlign="Center" Width="20%" />
                                    </asp:BoundField>
                                    <asp:BoundField DataField="stuName" HeaderText="姓名">
                                        <HeaderStyle HorizontalAlign="Center" Width="12%" />
                                        <ItemStyle HorizontalAlign="Center" Width="12%" />
                                    </asp:BoundField>
                                    <asp:BoundField DataField="stuGender" HeaderText="性别">
                                        <HeaderStyle HorizontalAlign="Center" Width="8%" />
                                        <ItemStyle HorizontalAlign="Center" Width="8%" />
                                    </asp:BoundField>
                                    <asp:BoundField DataField="stuPwd" HeaderText="密码">
                                        <HeaderStyle HorizontalAlign="Center" Width="20%" />
                                        <ItemStyle HorizontalAlign="Center" Width="20%" />
                                    </asp:BoundField>
                                    <asp:TemplateField HeaderText="删除">
                                        <HeaderStyle HorizontalAlign="Center" Width="8%" />
                                        <ItemStyle HorizontalAlign="Center" Width="8%" />
                                        <ItemTemplate>
                                            <asp:Button ID="btnMyDelete" runat="server" CommandArgument='<%#Eval("stuNo")%>'
                                                CommandName="myDelete" Text="删除" OnClick="btnMyDelete_Click" />
                                        </ItemTemplate>
                                    </asp:TemplateField>
                                </Columns>
                                <HeaderStyle BackColor="OrangeRed" />
                                <AlternatingRowStyle BackColor="NavajoWhite" />
                                <PagerSettings FirstPageText="第一页" LastPageText="最后一页" Mode="NextPreviousFirstLast"
                                    NextPageText="下一页" PreviousPageText="上一页" />
                                <PagerStyle BackColor="#FFC080" Font-Size="Small" Font-Strikeout="False" Font-Underline="False"
                                    ForeColor="Black" HorizontalAlign="Center" VerticalAlign="Top" />
                            </asp:GridView>
                        </ContentTemplate>
                    </asp:UpdatePanel>
                </td>
            </tr>
        </table>
    </div>
    </form>
</body>
</html>
